package com.meng.system.domain.vo;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author Xu Meng
 * @since 2021-01-14
 */
public class SysLogVO extends Model<SysLogVO> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("操作IP")
    private String ip;

    @ApiModelProperty("操作类型 1 操作记录2异常记录")
    private Integer type;

    @ApiModelProperty("用户名称")
    private String userName;

    @ApiModelProperty("操作描述")
    private String description;

    @ApiModelProperty("请求方法")
    private String actionMethod;

    @ApiModelProperty("url")
    private String actionUrl;

    @ApiModelProperty("请求参数")
    private String params;

    @ApiModelProperty("浏览器")
    private String browser;

    @ApiModelProperty("类路径")
    private String classPath;

    @ApiModelProperty("请求方法")
    private String requestMethod;

    @ApiModelProperty("开始时间")
    private Date startTime;

    @ApiModelProperty("完成时间")
    private Date finishTime;

    @ApiModelProperty("消耗时间")
    private Long consumingTime;

    @ApiModelProperty("异常详情信息")
    private String exDesc;

    @ApiModelProperty("异常描述")
    private String exDetail;

    @ApiModelProperty("租户id")
    private Integer tenantId;

    @ApiModelProperty("操作地点")
    private String location;

    @ApiModelProperty("操作系统")
    private String os;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getActionMethod() {
        return actionMethod;
    }

    public void setActionMethod(String actionMethod) {
        this.actionMethod = actionMethod;
    }

    public String getActionUrl() {
        return actionUrl;
    }

    public void setActionUrl(String actionUrl) {
        this.actionUrl = actionUrl;
    }

    public String getParams() {
        return params;
    }

    public void setParams(String params) {
        this.params = params;
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getClassPath() {
        return classPath;
    }

    public void setClassPath(String classPath) {
        this.classPath = classPath;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public Long getConsumingTime() {
        return consumingTime;
    }

    public void setConsumingTime(Long consumingTime) {
        this.consumingTime = consumingTime;
    }

    public String getExDesc() {
        return exDesc;
    }

    public void setExDesc(String exDesc) {
        this.exDesc = exDesc;
    }

    public String getExDetail() {
        return exDetail;
    }

    public void setExDetail(String exDetail) {
        this.exDetail = exDetail;
    }

    public Integer getTenantId() {
        return tenantId;
    }

    public void setTenantId(Integer tenantId) {
        this.tenantId = tenantId;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getOs() {
        return os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysLog{" +
        ", id=" + id +
        ", ip=" + ip +
        ", type=" + type +
        ", userName=" + userName +
        ", description=" + description +
        ", actionMethod=" + actionMethod +
        ", actionUrl=" + actionUrl +
        ", params=" + params +
        ", browser=" + browser +
        ", classPath=" + classPath +
        ", requestMethod=" + requestMethod +
        ", startTime=" + startTime +
        ", finishTime=" + finishTime +
        ", consumingTime=" + consumingTime +
        ", exDesc=" + exDesc +
        ", exDetail=" + exDetail +
        ", tenantId=" + tenantId +
        ", location=" + location +
        ", os=" + os +
        "}";
    }
}
